<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>UI</title>
		<script src="/script.ashx?lib=framework.js"></script>
        <script src="/script.ashx?lib=framework-UnitTest.js"></script>
        <script src="/script.ashx?lib=framework-UI.js"></script>
        <script src="/script.ashx?lib=framework-UI-Basic.js"></script>
        <script src="/script.ashx?lib=framework-UI-Container.js"></script>
        <script src="/script.ashx?lib=framework-UI-Choice.js"></script>
        <script src="/script.ashx?lib=framework-UI-ListView.js"></script>
        <script src="/script.ashx?lib=framework-UI-Dialog.js"></script>
        <script src="/script.ashx?lib=framework-standalone.js"></script>        
        <link rel="stylesheet" href="/script.ashx?css=style.css">
	</head>
	<body>
        <H1>Script UI Test 2</H1>
        
		<script type="text/javascript">
		    var p = new RexToy.UI.Controls.Page();
		    var btn = new RexToy.UI.Controls.Button('Open dialog');
		    p.appendControl(btn);
		    p.renderInto();
		    p.show();

		    var btnClose = new RexToy.UI.Controls.Button('Close');
		    var dlg = new RexToy.UI.Controls.Dialog('Test');
		    dlg.appendControl(btnClose);
		    dlg.renderInto();

		    function close() {
		        dlg.close('slide');		        
		    };

		    btnClose.attachEvent('onclick', close);

		    function open() {
		        dlg.show('slide');
		    };

		    btn.attachEvent('onclick', open);
        </script>
	</body>
</html>
